program P5_6;
const kl:array[1..12] of integer = (31,28,31,30,31,30,31,31,30,31,30,31);
var i1_d,i2_d:string[4];
    i,diffdays,m1,m2,d1,d2:integer;
begin
write('>>> enter first date: [MMDD] ');
readln(i1_d);
write('...     enter second date: ');
readln(i2_d);
m1:=10*(ord(i1_d[1])-ord('0'))+ord(i1_d[2])-ord('0');
m2:=10*(ord(i2_d[1])-ord('0'))+ord(i2_d[2])-ord('0');
diffdays:=0;
for i:=m1 to m2-1 do diffdays:=kl[i]+diffdays;
d1:=10*(ord(i1_d[3])-ord('0'))+ord(i1_d[4])-ord('0');
d2:=10*(ord(i2_d[3])-ord('0'))+ord(i2_d[4])-ord('0');
diffdays:=diffdays-d1+d2;
dec(diffdays);
writeln('=== difference is ',diffdays,' days');
end.
